//
//  YSOrdinaryOrderDetailHeaderView.m
//  Yueshi
//
//  Created by Northwan on 15/8/5.
//  Copyright (c) 2015年 悦食中国. All rights reserved.
//

#import "YSOrdinaryOrderDetailHeaderView.h"
#import "YSBusinessCtrl.h"

@interface YSOrdinaryOrderDetailHeaderView()
@property (weak, nonatomic) IBOutlet UILabel *orderNumLabel;
@property (weak, nonatomic) IBOutlet UILabel *orderStatusLabel;

@property (weak, nonatomic) IBOutlet UILabel *orderTimeLabel;
@property (weak, nonatomic) IBOutlet UILabel *addresseeLabel;
@property (weak, nonatomic) IBOutlet UILabel *phoneLabel;
@property (weak, nonatomic) IBOutlet UILabel *addressLabel;

@end


@implementation YSOrdinaryOrderDetailHeaderView

+(instancetype)headerView{
    return [[[NSBundle mainBundle]loadNibNamed:@"YSOrdinaryOrderDetailHeaderView" owner:nil options:nil]lastObject];
}

-(void)setResult:(YSOrderDetailRes *)result{
    _result = result;
    [self.addresseeLabel setText:result.addressee];
    [self.phoneLabel setText:result.phoneCode];
    [self.addressLabel setText:result.detailAdres];
}

-(void)setOrder:(YSOrder *)order{
    _order = order;
    [self.orderNumLabel setText:order.orderCode];
    [self.orderStatusLabel setText:order.orderStatusName];
    [self.orderTimeLabel setText:order.orderCreateTime];
}

@end
